/** ***********************************************************************
*  $Id: $
*
*  COPYRIGHT @2008 CSS CORP PVT LTD
*          
*  This program is free software; you can redistribute it and/or modify it under the terms of 
*  version 2 of the GNU General Public License as published by the Free Software 
*  Foundation.
*
*  The above copyright notice and this permission notice shall be included in all copies 
*  or substantial portions of the Software.
*
*  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
*  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
*  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
*  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 
*  HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
*  WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
*  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
*  DEALINGS IN THE SOFTWARE.
*
************************************************************************* */

package com.css.ctg.tulip.bean;

import java.io.Serializable;

/**
 * <p> 	Framework DataBean abstract class.
 * 
 * <p> 	This class would be extended by the databean class that implements
 * 		the framework.
 * 		This databean class has getters and setter for the default validation rules
 * 		verirified by the tulip framework. 
 * 
 * @version $Rev: 
 *          $
 *
 **/

public abstract class TulipDataBean implements Serializable{
	
	private static final long serialVersionUID = 1L;
	
	private String contentType=null;
	private int noOfImages;	
	private int imageArray[]=null;
	private boolean image;
	private boolean frame;	
	private boolean applet;
	private boolean viewport;	
	private boolean viewportForIPhone;
	private int noOfWebLinks;
	private String[] webLinkArray=null;
	private int noOfEmbeddedSwfFiles;			
	private int noOfEmbeddedSvgFiles;
	private int noOfFileUpload;
	private int noOfMouseOver;
	
	/**
	 * Method to get ImageLength
	 * 
	 * @return int
	 */
	public int getImageLength() {
		return imageArray.length;
	}

	/**
	 * Method to set ImageLenth
	 * 
	 * @param imageLength
	 * @return void
	 */
	public void setImageLength(int imageLength) {
		imageArray=new int[imageLength];
	}

	/**
	 * Method to get No of Mouse Over occurances
	 * 
	 * @return int
	 */
	public int getNoOfMouseOver() {
		return noOfMouseOver;
	}

	/**
	 * Method to get No of Mouse Over occurances
	 * 
	 * @param int
	 * @return void
	 */	
	public void setNoOfMouseOver(int noOfMouseOver) {
		this.noOfMouseOver = noOfMouseOver;
	}

	/**
	 * Used to retrieve the NoOfEmbeddedSwfFiles found in the web site
	 * 
	 * @return int
	 */
	public int getNoOfEmbeddedSwfFiles() {
		return noOfEmbeddedSwfFiles;
	}
	
	/**
	 * Used to store the NoOfEmbeddedSwfFiles found in the web site.
	 * 
	 * @param noOfEmbeddedSwfFiles
	 */
	public void setNoOfEmbeddedSwfFiles(int noOfEmbeddedSwfFiles) {
		this.noOfEmbeddedSwfFiles = noOfEmbeddedSwfFiles;
	}
	
	/**
	 * Used to retrieve the NoOfEmbeddedSvgFiles found in the web site.
	 * 
	 * @return int
	 */
	public int getNoOfEmbeddedSvgFiles() {
		return noOfEmbeddedSvgFiles;
	}
	
	/**
	 * Used to store the NoOfEmbeddedSvgFiles found in the web site.
	 * 
	 * @param noOfEmbeddedSvgFiles
	 */
	public void setNoOfEmbeddedSvgFiles(int noOfEmbeddedSvgFiles) {
		this.noOfEmbeddedSvgFiles = noOfEmbeddedSvgFiles;
	}

	/**
	 * Used to retrieve the NoOfWebLinks found in the web site.
	 * 
	 * @return int
	 */
	public int getNoOfWebLinks() {
		return noOfWebLinks;
	}
	
	/**
	 * Used to store the NoOfWebLinks found in the web site.
	 * 
	 * @param noOfWebLinks
	 */
	public void setNoOfWebLinks(int noOfWebLinks) {
		this.noOfWebLinks = noOfWebLinks;
	}		
	
	/**
	 * Method to get WebLinkArrayLenght
	 * 
	 * @return int
	 */
	public int getWebLinkArrayLength() {
		return webLinkArray.length;
	}

	/**
	 * Method to set WebLinkArrayLength
	 * 
	 * @param webLinkArrayLength
	 */
	public void setWebLinkArrayLength(int webLinkArrayLength) {
		webLinkArray=new String[webLinkArrayLength];
	}
	
	
	/**
	 * Used to retieve the array of strings which contains the url of the webLinks found in the web site.
	 * 
	 * @return String
	 */
	public String getWebLinkArray(int index) {
		return webLinkArray[index];
	}
	
	/**
	 * Used to store the array of strings which contains the url of the webLinks found in the web site. 
	 * 
	 * @param webLinkArray
	 */
	public void setWebLinkArray(int index,String webLink) {
		this.webLinkArray[index] = webLink;
	}
	
	
		
	/**
	 * Used to retrieve the ContentType of the web site.
	 * 
	 * @return String
	 */
	public String getContentType() {
		return contentType;
	}
	
	/**
	 * Used to store the ContentType of the web site.
	 * 
	 * @param contentType
	 */
	public void setContentType(String contentType) {
		this.contentType = contentType;
	}
	
	/**
	 * Used to retrieve the NoOfImage found in the web site.
	 * 
	 * @return int
	 */
	public int getNoOfImages() {
		return noOfImages;
	}
	
	/**
	 * Used to store the NoOfImage found in the web site.
	 * 
	 * @param noOfImages
	 */
	public void setNoOfImages(int noOfImages) {
		this.noOfImages = noOfImages;
	}
		
	/**
	 * Used to get the flag for the Image. 
	 * true  - if, image found in the web site.
	 * false - otherwise.
	 * 
	 * @return boolean
	 */
	public boolean hasImage() {
		return image;
	}	
	
	/**
	 * Used to set the flag for the Image. 
	 * true  - if, image found in the web site.
	 * false - otherwise.
	 *  
	 * @param image
	 */
	public void setImage(boolean image) {
		this.image = image;
	}
	
		
	/**
	 * Used to get the flag for the Frame. 
	 * true  - if, frame found in the web site.
	 * false - otherwise.
	 * 
	 * @return boolean
	 */
	public boolean hasFrame() {
		return frame;
	}
	
	/**
	 * Used to set the flag for the Frame. 
	 * true  - if, frame found in the web site.
	 * false - otherwise.
	 *  
	 * @param frame
	 */
	public void setFrame(boolean frame) {
		this.frame = frame;
	}
		
			
	/**
	 * Used to get the flag for the Viewport. 
	 * true  - if, Viewport meta tag  found in the web site.
	 * false - otherwise.
	 * 
	 * @return boolean
	 */
	public boolean hasViewport() {
		return viewport;
	}
	
	/**
	 * Used to get the flag for the Viewporte. 
	 * true  - if, Viewport meta tag found in the web site.
	 * false - otherwise.
	 * 
	 * @param viewport
	 */
	public void setViewport(boolean viewport) {
		this.viewport = viewport;
	}
		
		
	/**
	 * Used to get the flag for the Applets. 
	 * true  - if, Applets found in the web site.
	 * false - otherwise.
	 * 
	 * @return boolean
	 */
	public boolean hasApplet() {
		return applet;
	}
	
	/**
	 * Used to set the flag for the Applets. 
	 * true  - if, Applets found in the web site.
	 * false - otherwise.
	 * 
	 * @param applet
	 */
	public void setApplet(boolean applet) {
		this.applet = applet;
	}	
	
	/**
	 * Used to retrieve the size of a images given index found in the web site.
	 * 
	 * @return int
	 */
	public int getImageArray(int index) {
		return imageArray[index];
	}
	
	/**
	 * Used to store the size of all images found in the web site.
	 * 
	 * @param imageArray the imageArray to set
	 */
	public void setImageArray(int index,int value) {
		this.imageArray[index] = value;
	}
	
			
	/**
	 * Used to retrieve the NoOfFileUpload found in the web site.
	 * 
	 * @return int
	 */
	public int getNoOfFileUpload() {
		return noOfFileUpload;
	}
	
	
	/**
	 * Used to store the NoOfFileUpload found in the web site.
	 * 
	 * @param noOfFileUpload the noOfFileUpload to set
	 */
	public void setNoOfFileUpload(int noOfFileUpload) {
		this.noOfFileUpload = noOfFileUpload;
	}

	/**
	 * Method to return boolean value of isViewportForIPhone
	 * 
	 * @return boolean
	 */
	public boolean isViewportForIPhone() {
		return viewportForIPhone;
	}

	/**
	 * Method to set ViewportForIPhone
	 * 
	 * @param viewportForIPhone the viewportForIPhone to set
	 */
	public void setViewportForIPhone(boolean viewportForIPhone) {
		this.viewportForIPhone = viewportForIPhone;
	}
}

